diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
index 8c308621d2..63686ed7a8 100644
--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -42,7 +42,7 @@ class MigrationLoader:
 
     def __init__(self, connection, load=True, ignore_no_migrations=False):
         self.connection = connection
-        self.disk_migrations = None
+        self.disk_migrations = {}
         self.applied_migrations = None
         self.ignore_no_migrations = ignore_no_migrations
         if load:
@@ -85,11 +85,6 @@ class MigrationLoader:
                 raise
             else:
                 # Empty directories are namespaces.
-                # getattr() needed on PY36 and older (replace w/attribute access).
-                if getattr(module, '__file__', None) is None:
-                    self.unmigrated_apps.add(app_config.label)
-                    continue
-                # Module is not a package (e.g. migrations.py).
                 if not hasattr(module, '__path__'):
                     self.unmigrated_apps.add(app_config.label)
                     continue
